package org.lex.utils.collections;

import java.util.Enumeration;
import java.util.Iterator;

public class EmptyIterator<T> implements Iterator<T>, Enumeration<T> {
	private static final EmptyIterator instance = new EmptyIterator();

	@SuppressWarnings("unchecked")
	public static <T> EmptyIterator<T> getInstance() {
		return instance;
	}

	public EmptyIterator() {
	}

	public boolean hasNext() {
		return false;
	}

	public T next() {
		return null;
	}

	public void remove() {
	}

	// Enumeration
	@Override
	public boolean hasMoreElements() {
		return false;
	}

	@Override
	public T nextElement() {
		return null;
	}
}
